package a.f.n;

import a.a.hb;
import a.c.ab;
import a.c.n;
import a.f.o;
import a.f.r;
import a.f.rc;
import a.f.wc;

public class a
  extends r
{
  public static final Object g = "TreeReductionStage#NON_TREE_EDGES_DPKEY";
  private rc h;
  private Object i;
  public static int j;
  
  public boolean canLayout(o paramo)
  {
    return true;
  }
  
  public void doLayout(o paramo)
  {
    boolean bool2 = k.n;
    boolean bool1 = k.m;
    a.c.k localk = paramo.c(g);
    ab localab1 = new ab();
    if (localk != null)
    {
      localObject1 = paramo.w();
      do
      {
        if (!((a.c.m)localObject1).e()) {
          break;
        }
        if (!bool2)
        {
          if (localk.getBool(((a.c.m)localObject1).a()))
          {
            paramo.f(((a.c.m)localObject1).a());
            localab1.add(((a.c.m)localObject1).a());
          }
          ((a.c.m)localObject1).f();
        }
      } while (!bool1);
    }
    Object localObject1 = a.a.m.b(paramo);
    ab localab2 = hb.a(paramo);
    ab localab3 = new ab(paramo.w());
    localab3.removeAll(localab2);
    Object localObject2 = ((ab)localObject1).l();
    do
    {
      do
      {
        if (!((a.c.m)localObject2).e()) {
          break;
        }
        paramo.a(((a.c.m)localObject2).a());
        ((a.c.m)localObject2).f();
        if (bool2) {
          break label204;
        }
        if (bool1) {
          break label197;
        }
      } while (!bool1);
    } while (bool2);
    localObject2 = localab3.l();
    label197:
    if (((a.c.m)localObject2).e())
    {
      label204:
      paramo.f(((a.c.m)localObject2).a());
      if (!bool2) {
        ((a.c.m)localObject2).f();
      }
    }
    else
    {
      for (;;)
      {
        if (!bool1)
        {
          if (!bool1) {
            break;
          }
          if (!bool2) {
            a().doLayout(paramo);
          }
        }
      }
    }
    localObject2 = localab3.l();
    do
    {
      do
      {
        if (!((a.c.m)localObject2).e()) {
          break;
        }
        paramo.g(((a.c.m)localObject2).a());
        ((a.c.m)localObject2).f();
        if (bool2) {
          break label323;
        }
        if (bool1) {
          break label316;
        }
      } while (!bool1);
    } while (bool2);
    localObject2 = localab1.l();
    label316:
    if (((a.c.m)localObject2).e()) {
      label323:
      if (!bool2)
      {
        paramo.g(((a.c.m)localObject2).a());
        ((a.c.m)localObject2).f();
      }
    } else {
      for (;;)
      {
        if (!bool1)
        {
          if (!bool1) {
            break;
          }
          if (!bool2) {
            localab3.a(localab1);
          }
        }
      }
    }
    localObject2 = paramo.C();
    a.c.m localm = localab3.l();
    if (localm.e())
    {
      ((n)localObject2).a(localm.a(), true);
      localm.f();
    }
    for (;;)
    {
      if ((bool2) || (!bool1))
      {
        if (!bool1) {
          break;
        }
        a(paramo, (n)localObject2);
        if (!bool2) {
          paramo.a((n)localObject2);
        }
      }
    }
  }
  
  protected void a(o paramo, n paramn)
  {
    boolean bool = k.n;
    if (this.h == null) {
      return;
    }
    a.c.k localk = null;
    if (this.i != null)
    {
      localk = paramo.c(this.i);
      paramo.a(this.i, paramn);
    }
    if (!bool) {
      if ((this.h instanceof a_)) {
        ((a_)this.h).e = paramn;
      }
    }
    this.h.doLayout(paramo);
    if (!bool)
    {
      paramo.j(this.i);
      if (localk == null) {}
    }
    else
    {
      paramo.a(this.i, localk);
    }
  }
  
  public rc b()
  {
    return this.h;
  }
  
  public void b(rc paramrc)
  {
    this.h = paramrc;
  }
  
  public Object c()
  {
    return this.i;
  }
  
  public void a(Object paramObject)
  {
    this.i = paramObject;
  }
  
  public rc d()
  {
    return new a_();
  }
  
  static class a_
    implements rc
  {
    a.c.k e;
    
    public boolean canLayout(o paramo)
    {
      return true;
    }
    
    public void doLayout(o paramo)
    {
      boolean bool2 = k.n;
      boolean bool1 = k.m;
      if (this.e != null)
      {
        a.c.m localm = paramo.w();
        do
        {
          if (!localm.e()) {
            break;
          }
          if (!bool2)
          {
            if (this.e.getBool(localm.a())) {
              wc.b(paramo, localm.a());
            }
            localm.f();
          }
        } while (!bool1);
      }
    }
  }
}


/* Location:           E:\idea\
 * Qualified Name:     a.f.n.a
 * JD-Core Version:    0.7.0.1
 */